<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // let p3 = Promise.resolve(3);
      let p4 = Promise.reject(4);

      p4.then(
        (value) => {
          console.log("成功了1", value);
        }
        // (reason) => {
        //   console.log("失败了1", reason);
        // }
      );
      p4.then(
        (value) => {
          console.log("成功了2", value);
        },
        (reason) => {
          console.log("失败了2", reason);
        }
      );
    </script>
  </body>
</html>
